<?php	
	/*
	 *	Sample Module template for "OH"
	 *  
	 *  use for write develop module interface
	 *  to encampusulate opensource script into "OH"
	 */
	
	// Interface function	
	function oh_module_redirect($tokens) {
		global $oh_object_redirect;
		return $oh_object_redirect;	
	} 

	// Option file required
	//require_once($oh['path']."...");
	//require_once($oh['path']."...");
	
	// Main class of module
	class oh_class_redirect {		
		function oh_class_redirect() {
		}
		function to($url) {
			if (!headers_sent()) {
			    header('Location: '.$url);
			    exit;
			} else {
				echo '<script type="text/javascript">';	
				echo 'function redirect_to() {';
				echo 'window.location="'.$url.'";';
				echo '}';
				echo 'setTimeout("redirect_to();",3000)';
				echo '</script>';	
			}
		}
	}
	
	// Main object of module
	global $oh_object_redirect;
	$oh_object_redirect = new oh_class_redirect();
?>